﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ServiceBooking.aspx.cs" Inherits="TireService.Mobile.ServiceBooking" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <h1>Kørselsskema</h1>
    <dx:ASPxDateEdit ID="txtDate" runat="server" Width="150px">
    </dx:ASPxDateEdit>
    <dx:ASPxComboBox ID="ddlServiceCar" runat="server" Width="150px">
    </dx:ASPxComboBox>
    <dx:ASPxButton ID="btnShowSchedule" runat="server" Text="Vis skema" 
        Width="150px" Height="75px" onclick="btnShowSchedule_Click">
    </dx:ASPxButton>
    <br />
    <dx:ASPxGridView ID="gvServiceSchedule" runat="server" ClientInstanceName="gvServiceSchedule" Caption="Kørselskema" 
        KeyFieldName="ServiceCarScheduleDetailId" Width="100%" AutoGenerateColumns="False" EnableCallBacks="True">
        <SettingsLoadingPanel Text="Henter&amp;hellip;" />
        <Settings ShowHeaderFilterButton="false" ShowGroupPanel="false" ShowFilterRow="false" ShowPreview="true" />
        <SettingsPager AlwaysShowPager="false" PageSize="25" Position="TopAndBottom">
            <Summary 
                AllPagesText="Sider: {0} - {1} ({2} kørsler)" 
                Text="Side {0} af {1} ({2} kørsler)" />
        </SettingsPager>
        <SettingsBehavior ConfirmDelete="True" AllowGroup="false" AllowDragDrop="false" />
        <%--<Columns>
            <dx:GridViewDataColumn FieldName="ToAddress" VisibleIndex="3" Caption="Adresse">
            </dx:GridViewDataColumn>
        </Columns>--%>

        <Templates>
            <PreviewRow>
                
                <b><asp:Label ID="lblStartTime" runat="server" Text='<%# Eval("StartTime") %>'></asp:Label> - <asp:Label ID="lblEndTime" runat="server" Text='<%# Eval("EndTime") %>'></asp:Label></b><br />
                <asp:Label ID="lblAddress" runat="server" Text='<%# Eval("ToAddress") %>'></asp:Label>, <asp:Label ID="lblZipCode" runat="server" Text='<%# Eval("ToZipCode") %>'></asp:Label> <asp:Label ID="lblCity" runat="server" Text='<%# Eval("ToCity") %>'></asp:Label><br />
                <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label><br />
                <asp:Label ID="lblCarbrand" runat="server" Text='<%# Eval("CarBrandDescription") %>'></asp:Label> - <asp:Label ID="lblRegistrationNumber" runat="server" Text='<%# Eval("RegistrationNumber") %>'></asp:Label><br />
                Telefon: <asp:Label ID="lblPhone1" runat="server" Text='<%# Eval("Phone1") %>'></asp:Label> - <asp:Label ID="lblPhone2" runat="server" Text='<%# Eval("Phone2") %>'></asp:Label><br />
                <asp:Literal ID="lNote" runat="server" Text='<%# Eval("Note") %>'></asp:Literal>
                <a href="SendSMS.aspx?Id='<%# Eval("ServiceCarScheduleDetailId") %>'">Send SMS</a> | <a href="ServiceCompleted.aspx?Id='<%# Eval("ServiceCarScheduleDetailId") %>'">Afslut opgave</a>
                <hr />
            </PreviewRow>
        </Templates>

    </dx:ASPxGridView>

</asp:Content>
